package UnitTest.DataStructureTest.stringANDlineTest.sequenceANDstringTest;

import DataStructure.stringOps.stringAndSequence.DigitalTrans;
import Logic.constant.C;
import Logic.dbUtils.DBTools;
import org.junit.Test;

/**
 * @author liujun
 * @date 2020-02-26 09:21
 * @description 人民币大小写转换 测试案例
 */
public class DigitalTransTest extends DigitalTransData {

    @Test
    public void TestTrans() throws Exception {
        test(new DigitalTrans());
    }

    public void test(DigitalTrans instance) throws Exception {
        String ans = instance.transMethod(Demo01);
        assert ans.equals(Demo01Target);
        ans = instance.transMethod(Demo02);
        assert ans.equals(Demo02Target);
        ans = instance.transMethod(Demo03);
        assert ans.equals(Demo03Target);
        ans = instance.transMethod(Demo04);
        assert ans.equals(Demo04Target);
        ans = instance.transMethod(Demo05);
        assert ans.equals(Demo05Target);
        ans = instance.transMethod(Demo06);
        assert ans.equals(Demo06Target);
        ans = instance.transMethod(Demo07);
        assert ans.equals(Demo07Target);
        ans = instance.transMethod(Demo08);
        assert ans.equals(Demo08Target);
        ans = instance.transMethod(Demo09);
        assert ans.equals(Demo09Target);

        ans = instance.transMethod(Demo101);
        assert ans.equals(C.Error);
        ans = instance.transMethod(Demo102);
        assert ans.equals(C.Error);
        ans = instance.transMethod(Demo103);
        assert ans.equals(C.Error);
        ans = instance.transMethod(Demo104);
        assert ans.equals(C.Error);
        ans = instance.transMethod(Demo105);
        assert ans.equals(C.Error);
        ans = instance.transMethod(Demo106);
        assert ans.equals(C.Error);
    }
}
